import request  from "@/utils/request.js";
const PREFIX = "/admin/category"
export default {
    getVideoCategoryTree(){
        return request(({
            url:`${PREFIX}/tree`,
            method:'get'
        }))
    },

    getVideoCategoryInfo(categoryId){
        return request({
            url:`${PREFIX}/info/${categoryId}`,
            method:'get'
        })
    },
    updateCategory(categoryDto){
        return request({
            method:"post",
            url: `${PREFIX}/update`,
            data:categoryDto
        })
    },
    addCategory(categoryDto){
        return request({
            url:`${PREFIX}/add`,
            method:'post',
            data:categoryDto
        })
    },
    deleteCategory(categoryIds){
        return request({
            url:`${PREFIX}/delete`,
            method:'post',
            data:{
                deleteIds:categoryIds
            }
        })
    }
}